﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.ServiceModel;
using System.ServiceModel.Web;

namespace LyncServerExtension.WebService
{
    /// <summary>
    /// Interface to represent the HTTP web service operations.
    /// </summary>
    [ServiceContract]
    public interface ILyncWebService
    {
        /// <summary>
        /// Lists the authorized owners.
        /// </summary>
        /// <param name="id">The plugin id.</param>
        /// <param name="culture">The culture.</param>
        /// <returns></returns>
        [OperationContract, WebGet]
        Stream ListAuthorizedOwners(string id, string culture);

        /// <summary>
        /// Lists the authorized delegates.
        /// </summary>
        /// <param name="id">The plugin id.</param>
        /// <param name="culture">The culture.</param>
        /// <param name="ownerSip">The owner sip.</param>
        /// <returns></returns>
        [OperationContract, WebGet]
        Stream ListAuthorizedDelegates(string id, string culture, string ownerSip);

        /// <summary>
        /// Lists the current delegates of the given owner.
        /// </summary>
        /// <param name="id">The plugin id.</param>
        /// <param name="culture">The culture.</param>
        /// <param name="ownerSip">The owner sip.</param>
        /// <returns></returns>
        [OperationContract, WebGet]
        Stream ListDelegates(string id, string culture, string ownerSip);

        /// <summary>
        /// Gets the user photo.
        /// </summary>
        /// <param name="sip">The user sip.</param>
        /// <returns></returns>
        [OperationContract, WebGet]
        Stream GetUserPhoto(string sip);

        /// <summary>
        /// Sets the call forwarding delegation.
        /// </summary>
        /// <param name="id">The plugin id.</param>
        /// <param name="culture">The culture.</param>
        /// <param name="enabled">if set to <c>true</c> [enabled].</param>
        /// <param name="ownerSip">The owner sip.</param>
        /// <param name="delegateSip">The delegate sip.</param>
        /// <param name="state">The state.</param>
        /// <returns></returns>
        [OperationContract, WebGet]
        Stream SetCallForwardingDelegation(string id, string culture, bool enabled, string ownerSip, string delegateSip, string state);
    }
}
